import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

/**
 * Creating a sidebar enables you to:
 - create an ordered group of docs
 - render a sidebar for each doc of that group
 - provide next/previous navigation

 The sidebars can be generated from the filesystem, or explicitly defined here.

 Create as many sidebars as you want.
 */
const sidebars: SidebarsConfig = {
  // By default, Docusaurus generates a sidebar from the docs folder structure
  docsSidebar: [
    //{type: 'autogenerated', dirName: '.'},
    'index',
    'features',
    'supported-platforms',
    {
      type: 'category',
      label: 'Quick Start',
      collapsed: false,
      items: [
        'quickstart',
        'quickstart-unity',
      ]
    },
    {
      type: 'category',
      label: 'Installation',
      collapsed: false,
      items: [
        'installation/packages',
        'installation/unity'
      ],
    },
    {
      type: 'category',
      label: 'What\'s new',
      items: [
        'release-notes/7.0',
      ],
    },
    {
      type: 'category',
      label: 'Fundamentals',
      collapsed: false,
      items: [
        'fundamentals/unary-or-streaminghub',
        'fundamentals/project-structure',
        'fundamentals/exceptions-and-status-codes',
        'fundamentals/authentication',
        'fundamentals/lifecycle',
        'fundamentals/https',
        'fundamentals/aot',
        {
          type: 'category',
          label: 'Logging and Monitoring',
          items: [
            'fundamentals/metrics',
          ],
        },
        'fundamentals/version-compatibility',
      ],
    },
    {
      type: 'category',
      label: 'Unary service',
      items: [
        'unary/fundamentals',
        'unary/getting-started',
        'unary/metadata',
        'unary/raw-bytes-response',
      ],
    },
    {
      type: 'category',
      label: 'StreamingHub service',
      items: [
        'streaminghub/fundamentals',
        'streaminghub/getting-started',
        'streaminghub/define-interface',
        'streaminghub/call-client',
        {
          type: 'category',
          label: 'Group',
          items:[
            'streaminghub/group',
            'streaminghub/group-application-managed',
            'streaminghub/group-backplane',
          ]
        },
        'streaminghub/server-events',
        'streaminghub/disconnection',
        'streaminghub/heartbeat',
        'streaminghub/client-results',
      ],
    },
    {
      type: 'category',
      label: 'Filter',
      items:[
        'filter/fundamentals',
        'filter/client-filter',
        'filter/streaminghub-filter',
        'filter/extensibility',
        'filter/dependency-injection',
      ]
    },
    {
      type: 'category',
      label: 'Best practices',
      items: [
        'best-practices/load-tests',
        'best-practices/hub-context-pattern',
      ]
    },
    {
      type: 'category',
      label: 'Integration',
      items: [
        {
          type: 'category',
          label: 'Unity',
          items: [
            'integration/unity',
            'integration/unity-webgl',
          ]
        },
        'integration/blazor',
        'integration/dependency-injection',
        'integration/json-transcoding',
      ]
    },
    {
      type: 'category',
      label: 'Source Generator',
      items: [
        'source-generator/client',
      ]
    },
    {
      type: 'category',
      label: 'Advanced',
      items: [
        'advanced/customize-serialization-encryption',
        'advanced/magiconionoptions',
        'advanced/map-service-endpoints',
        'advanced/memorypack',
        'advanced/raw-grpc'
      ]
    },
  ],
};

export default sidebars;
